<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        function confirm_del(url) {
            if(confirm("改操作不可逆!确定操作?")) {
                window.location = url; //调用超链接
            }
            return false;
        }
    </script>
</head>
<body>
<h3 style="text-align: center">
    <a href="/web/">栏目管理</a>
    <a href="/web/topic_find">文章管理</a>
</h3>
<hr>
<table width="1000" align="center" border="1">
    <thead>
        <tr><td colspan="10">
            <a href="/web/category/add_input">添加栏目</a> <a href="/web/category/find">栏目列表</a>
        </td></tr>
    </thead>
    <tr>
        <td>标识</td>
        <td>名称</td>
        <td>类型</td>
        <td>是否是导航</td>
        <td>是否是首页</td>
        <td>超链接</td>
        <td>创建日期</td>
        <td>排序号</td>
        <td>父栏目</td>
        <td>操作</td>
    </tr>
    {% for c in cs %}
    <tr>
        <td>{{ c.id }}</td>
        <td>{{ c.name }}</td>
        <td>
            {% if c.type is 0 %}
                导航栏目
            {% elif c.type is 1 %}
                文章列表
            {% elif c.type is 2 %}
                内容列表
            {% elif c.type is 3 %}
                图片列表
            {% elif c.type is 4 %}
                超链接
            {% endif %}
        </td>
        <td>{{ c.is_nav }}</td>
        <td>{{ c.is_index }}</td>
        <td>{{ c.href }}</td>
        <td>{{ c.create_date }}</td>
        <td>{{ c.orders }}</td>
        <td>
            {{ c.parent.name }}
        </td>
        <td><a href="javascript:confirm_del('/web/category/delete/{{ c.id }}')">删除</a>
            <a href="/web/category/update_input/{{ c.id }}">修改</a></td>
    </tr>
    {% endfor %}
</table>
</body>
</html>